import request from '@/config/request'

// 登录、注册
export const loginApi = params => {
  return request({
    url: '/api/user/login',
    method: 'POST',
    params
  })
}

// 购买会员
export const paymentApi = params => {
  return request({
    url: '/api/recharge/pay',
    method: 'POST',
    params
  })
}

// 验证手机号
export const fetchUserPhone = params => {
  return request({
    url: '/api/user/phone',
    method: 'POST',
    params
  })
}

// 文章列表
export const fetchArticleList = params => {
  return request({
    url: '/api/index/article',
    method: 'POST',
    params
  })
}

// 开启公众号订阅
export const gzhYesApi = params => {
  return request({
    url: '/api/user/gzhYes',
    method: 'POST',
    params
  })
}
// 总次数
export const allnumApi = params => {
  return request({
    url: '/api/user.index/allnum',
    method: 'POST',
    params
  })
}

// 判断是否是新用户
export const logoStatusApi = params => {
  return request({
    url: '/api/index/logoStatus',
    method: 'GET',
    params
  })
}

// 观看广告赠送1个次数
export const adOneCardApi = params => {
  return request({
    url: '/api/user/onecard',
    method: 'POST',
    params
  })
}
